package cg.project.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//import tech.aistar.interceptor.LoginInterceptor;

/**
 * 本来用来演示:
 *
 * @author success
 * @date 2024/11/5 14:32:17
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
//    @Bean
//    public LoginInterceptor loginInterceptor(){
//        return new LoginInterceptor();
//    }
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginInterceptor())
//                .addPathPatterns("/**")//哪些路径需要拦截
//                .excludePathPatterns("/user/sendCode","/user/login","/index/user")
//                .excludePathPatterns("/views/**","/plugins/**","/imgs/**");//哪些路径不需要拦截
//    }
}
